import request from '@/utils/request'

// 查询学生紧急联系人信息列表
export function listUrgent(query) {
  return request({
    url: '/edu/urgent/list',
    method: 'get',
    params: query
  })
}

export function listUrgentByStudentId(studentId) {
  return request({
    url: '/edu/urgent/list/' + studentId,
    method: 'get'
  })
}

// 查询学生紧急联系人信息详细
export function getUrgent(urgentId) {
  return request({
    url: '/edu/urgent/' + urgentId,
    method: 'get'
  })
}

// 新增学生紧急联系人信息
export function addUrgent(data) {
  return request({
    url: '/edu/urgent',
    method: 'post',
    data: data
  })
}

// 修改学生紧急联系人信息
export function updateUrgent(data) {
  return request({
    url: '/edu/urgent',
    method: 'put',
    data: data
  })
}

// 删除学生紧急联系人信息
export function delUrgent(urgentId) {
  return request({
    url: '/edu/urgent/' + urgentId,
    method: 'delete'
  })
}

// 导出学生紧急联系人信息
export function exportUrgent(query) {
  return request({
    url: '/edu/urgent/export',
    method: 'get',
    params: query
  })
}